Systems and methods for virtual traffic lights implemented on a mobile computing device

ABSTRACT

Disclosed herein is an implementation of a Virtual Traffic Lights (VTL) application implemented as an app on a mobile computing device in which online mapping services provide information necessary to determine a lead vehicle among one or more vehicles approaching an intersection. The lead vehicle controls status of virtual traffic lights at the intersection. The information retrieved from in the online mapping service may be used to determine whether vehicles approaching intersection are moving closer or farther apart from each other, the direction of travel of the vehicles, the geographic location of the intersection, and the distance between each vehicle and the geographic location of the intersection.

RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Patent Application No. 62/606,736, filed Oct. 5, 2017.

BACKGROUND

Virtual Traffic Lights (VTL) is a recently proposed solution to the traffic congestion problem in urban areas. VTL removes the need for infrastructure-based traffic signaling devices at each intersection by moving the traffic signal into the vehicle. The VTL algorithm is dependent upon vehicles being able to communicate with each other as they approach intersections, such that one of the approaching vehicles may be selected as the VTL “leader” to control which approaches to the intersection have red signals and which approaches have green signals. The ability of inter-vehicle communication allows a more efficient control of the signaling devices.

The main goal of VTL is to increase traffic flow and/or to reduce commute time, especially during rush hours. A second important goal is to increase the safety of intersections that are not equipped with traffic signals. In the United States, for example, only about 1% of all intersections are equipped with traffic signals (even in New York City, only about 24% of intersections are equipped with traffic signals). While the original VTL scheme assumes a 100% penetration ratio, recently it has been shown that VTL can be implemented even with low penetration levels, such as 5-10% at the initial stages.

The VTL algorithm is described in U.S. Pat. No. 8,972,159, which describes an algorithm for use at an ideal intersection wherein vehicles communicate with each other prior to reaching the intersection, and which assumes that vehicle-to-vehicle communication is possible. A second version of the VTL algorithm is described in PCT application PCT/US18/54504 and addresses a non-ideal intersection at which vehicle-to-vehicle communication may not be possible prior to the vehicles reaching or being very near to the intersection. This may be caused, for example, by obstructions at the corners of the intersection such as highrises, large buildings, trees, etc.

Both the ideal VTL and non-ideal VTL algorithms are fully efficient when all vehicles on the road are equipped with VTL infrastructure built into the vehicle. This would include, for example, a means of communication with the other vehicles, a source of geolocation information, such as GPS, a processor for executing software implementing the algorithms, and a means for indicating the state of the traffic signals within the vehicles, such as a display screen or heads-up display. As should be realized, it may take several years for all vehicles on the road to be equipped with the required infrastructure for full participation in VTL. Therefore, it is may be necessary to provide interim solutions which allow non-VTL enabled vehicles to participate in VTL.

One such interim solution is described in PCT application PTC/US18/43090. This solution assumes that a small percentage of vehicles are equipped with dedicated short-range communication (DSRC) radios, which were mandated for use in vehicles by the U.S. Department of Transportation in 2014. This interim solution places infrastructure at the intersections to allow DSRC-equipped vehicles to communicate with the traffic signal control device at the intersections. However, it would be desirable to provide an interim solution that does not require additional investment in infrastructure by local governments.

SUMMARY OF THE INVENTION

Disclosed herein is smartphone-based or tablet-based application (app) for providing an implementation of the Virtual Traffic Lights Protocol. This allows a gradual phasing-in of VTL as the number of VTL-enabled vehicles increases, and allows older, non-VTL-equipped vehicles to participate.

The proposed solution is based on a fully distributed architecture facilitated by vehicle-to-vehicle communications (V2V). The communications between different vehicles can be implemented using standard smart-phone connectivity (LTE, Bluetooth, Wi-Fi and WiFi Direct (the WiFi peer-to-peer (P2P) standard) in a way that mimics the behavior of the DSRC radios. In other embodiments, it is contemplated to allow the app to operate with aftermarket DSRC radios or to operate in vehicles having a DSRC radio but not the rest of the VU implementation (i.e., the software and the virtual traffic light display). In yet other embodiments, a dedicated device providing the display of the virtual traffic signals could be provided in lieu of a smart phone or tablet computing device. It should be noted that while using DSRC radio technology is the preferred embodiment of the invention disclosed in this patent application, other embodiments using other wireless technologies (such as WiFi, LTE, LTE-A, 5G, etc.) could also be possible.

In a preferred embodiment of the invention, the Google Map Application Program Interface (API) is used for localization and intersection detection without any other external map. This approach allows the VTL prototype to work at any kind of intersection. For purposes of this disclosure, an intersection is determined to be located at the center of the intersection, which can be unequivocally identified by using the street names that define the specific intersection.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an intersection having two conflicting vehicles approaching.

FIG. 2 is an example of Google Maps providing the location of an intersection given the names of the intersecting streets.

FIG. 3 is a flowchart of the localization algorithm.

FIG. 4 is a flowchart of the VTL leader election process.

FIG. 5 is an illustration of calculating the non-Euclidean distances.

FIG. 6 illustrates the conversion of spherical coordinates to Euclidean coordinates.

FIG. 7 illustrates computing the distance between two points on a sphere.

DETAILED DESCRIPTION

As used herein, the term “orthogonal”, when used in reference to roads at an intersection, does not require that the roads be at right angles to each other, but should be interpreted to mean any number of roads that cross each other at an intersection, wherein vehicles on “orthogonal” roads will collide if reaching the intersection at the same time.

In the VTL protocol, one of the most important issues is the conflict detection process, which triggers an algorithm to select a VTL leader. The VTL leader is the vehicle that controls the traffic signals at the intersection. When two or more vehicles are approaching the same intersection from orthogonal directions, they are in a conflict situation and a collision is possible.

The VTL protocol avoids any possible collision. When a conflict is detected, one vehicle is selected as the VTL leader and, in one embodiment, presents a red light indication in its own vehicle and broadcasts a message to all other vehicles approaching the intersection. The message contains an instruction to display a red light indicator for other vehicles in its own approach and approaching from the opposite direction, and an instruction to display a green light indicator for the vehicles approaching the intersection from an orthogonal approach. Two or more vehicles are in conflict if they are approaching the same intersection but from orthogonal streets, as shown in FIG. 1.

For safety reasons, in preferred embodiments, the VTL leader should be the vehicle farthest from the intersection center among the first vehicles (the cluster leaders) in the four approaches. As shown in FIG. 1, vehicle A would be the VTL leader. Because the preferred embodiment of the VTL algorithm requires a determination of which vehicle is the farthest from the center of the intersection, the precise position of the intersection center is required.

Google Maps provides the latitude and longitude of each intersection using the name of the two streets that meet at that intersection. For example, if one wants to know the latitude and the longitude of the intersection center between Centre Avenue and North Craig Street in Pittsburgh, Pa., one can easily search this information on Google Maps. Google Maps responds to this query by showing the exact position of the intersection center, as shown in FIG. 2 by the red arrow labeled “A”. To get the latitude and the longitude of this point, one can right click on the arrow and select the “What's here?” option, which causes the latitude and longitude of the requested intersection to display. Google Maps also provides an application programming interface (API) for retrieving the same information.

To detect a possible conflict, the following information is needed:

-   -   1. The direction in which the vehicle is traveling;     -   2. The current geographic position of the vehicle; and     -   3. The geographic position of the intersection.

In one embodiment, the Assisted GPS (AGPS) system of each smartphone can provide the geographic position of the device (and therefore the vehicle) in latitude and longitude. In other embodiments, the geographic position of the device can be provided by a DSRC radio having a built-in GPS function. In yet other embodiments, information regarding the geographic position of the device may be provided by any known method or device. For example, the Google Location Manager API can provide this information. Using the Google API, the update frequency of the AGPS can be set in terms of time and space. As an example, by setting the update distance to 0 m and the update time to 30 ms, the system will try to upload the current position every 30 ms and can receive this position information in a timely manner if the communication network is not in a congested state.

To obtain vehicle position, each vehicle can easily compute the name of the street on which it is traveling using the Google Geocoder API. The Google Geocoder converts the latitude and longitude of a location to a human readable address, while the inverse Google Geocoder converts an address to latitude and longitude points. Unfortunately, this API is unable to provide the geographic position of an intersection.

To find the geographic position of an intersection, the Google Geocoding API may be used. Geocoding is an HTTP based service that replies to an HTTP request. The reply can be in one of two different formats, an XML object or a JSON Object (Java Script Object Notation). The JS ON Object requires less memory and therefore is the better solution in terms of delay performance. However, the Google Geocoding API has access limits for each user: 2500 requests per 24 hour period for free users and 100,000 requests per 24 hour period for Google Maps for Business. If a user exceeds the 24-hour limit, the APIs may stop working for that user temporarily. If the user continues to exceed this limit, their access to the APIs may be blocked.

To get the intersection information, a query very similar to the standard Google Maps query can be used. For instance, if latitude and the longitude of the intersection between Terrace St and Darragh St in Pittsburgh, Pa., is needed, the following URL may be used to find this information:

http://maps.googleapis.com/maps/api/geocode/json?addres s= Terrace+St+and+Darragh+St,+Pittsburgh+,+PA&sensor=false

The returned object contains the information in double precision in JAVA-SCRIPT fashion:

“formatted_address” : “Terrace Street & Darragh Street, University of Pittsburgh, Pittsburgh, PA 15213, USA”, “geometry” : { “location” : { “lat” : 40.4419548, “lng” : −79.9628374 },

After acquiring this information, each vehicle broadcasts periodically (e.g., every 100 ms) a beacon packet containing:

-   -   1. Two latitude and longitude pairs in the order [lat(t1),         long(t1), lat(t2), long(t2)] where t2>t1, [lat(t2), long(t2)] is         the last latitude and longitude pair computed while [lat(t1),         long(t1)] is the previous one.     -   2. The name of the street that the vehicle is traveling on         (e.g., “Terrace Street”).

The conflict detection algorithm works as follows. When vehicle A receives a beacon packet from vehicle B, it first checks the address information. If the street reported by vehicle B (i.e., the street on which vehicle B is currently travelling) is different from that of vehicle A, there is a high probability that the streets on which vehicle A and vehicle B are on will intersect. Before submitting the query for the intersection position, vehicle A needs to know if B is coming close.

Suppose that A's latitude and longitude pair is denoted as (lat, long). Using the 2 pairs of coordinates in the beacon packet, A will know that B is getting close if and only if:

(lat−lat(t ₁))²+(long−long(t ₁))²>(lat−lat(t ₂))²+(long−long(t ₂))²  (1)

and also:

|lat−lat(t ₁)|+|long−long(t ₁)|+|lat+lat(t ₁)|>|lat−lat(t ₂)|+|long−long(t ₂)|+|lat+lat(t ₂)|  (2)

If the angular distance is getting shorter, it implies that the real distance (this should not be confused with the Euclidean distance because it is a distance on the earth surface: i.e., an arc on a circle) is getting shorter as well.

At this point, if the two vehicles on two different streets are traveling toward the same intersection, then the receiver vehicle makes a query and provides the latitude and the longitude of the intersection center. By calculating the distance between the two vehicles and the intersection center respectively, it can be determined which vehicle is farther from the intersection. In a preferred embodiment of the invention, the vehicle farthest from the intersection center will become the VTL leader and will control the red/green indicators of the traffic signaling devices in each vehicle. However, in other embodiments, the algorithm may also check other factors, for example, the speed of the two vehicles, the acceleration of the two vehicles, and possibly other conditions, such as the number of vehicles in each approach. Thus, selection of the VTL Leader could be different if, for instance, one approach to the intersection has 10 vehicles while the other approach has only 1 vehicle and the distances are 70 meters and 60 meters, respectively.

The details of the localization algorithm 300 are shown in flowchart form in FIG. 3. It should be noted that, once the localization algorithm is executed, if there is an ensuing conflict, the VTL system will continue with the VTL leader selection algorithm 400, shown in FIG. 4.

With reference to FIG. 3, the localization algorithm starts at 302. At 304 the latitude and longitude of the vehicle at two different times is obtained from location provider thread 303. At 306, the street name that the vehicle is traveling on is obtained, given the latitude and longitude, from a geocode server 305. At 308 and 310, the algorithm waits to receive a beacon packet from another vehicle. Once a beacon packet has been received, at 312, it is determined if the street names are the same or different. If the street names are the same, the algorithm returns to 308 to receive another beacon packet because the vehicles are not on intersection streets. If the street names differ, indicating that the vehicles are on different, possibly intersecting, streets, at 314, the algorithm determines if the distance between the two vehicles is getting smaller or getting larger. At 316, if the vehicles are getting farther apart, indicating that one or the other of the vehicles traveling away from the intersection, control returns to 308 where the vehicle waits for receipt of another beacon packet. If the vehicles are getting closer at 316, indicating that the vehicles may be both approaching the intersection, control proceeds to 318 where the latitude and longitude of the intersection is retrieved, given the street names, from a maps provider API 319.

The VTL leader selection process 400 is shown in FIG. 4. At 402 the distance of each vehicle from the center of the intersection is calculated. At 404, the algorithm preferably determines if it is farther than the other vehicle to the intersection and, if so, declares itself the VTL leader at 406. Alternatively, other factors could also be taken into account, as described above. At 408 the VTL leader status packet is built and, at 410, a status packet is broadcast multiple times with the intended recipients being all vehicles approaching the intersection. At 412, the color of the traffic light indicator in the vehicle is set to indicate red. At 414 and 416, the algorithm waits for an acknowledgment packet indicating that the other vehicle has received the VTL status packet. If the acknowledgment is received, the algorithm ends at 430.

At 404, if the algorithm determines that the other vehicle is farther from the intersection, then, at 418, the algorithm declares that it's vehicle is not the VTL leader and, at 420 and 422, the algorithm waits for receipt of the VTL status packet from the VTL leader. Once the VTL status packet is received, the algorithm sets the color of the traffic light indicator in the vehicle to indicate green and the acknowledgment packet is sent to the VTL leader at 462.

Mathematical Basis

FIG. 5 shows two arcs of a circle with constant radius R. Let L₁ and L₂ denote the lengths of the arc AC and arc CB, respectively. Suppose L₁>L₂.

The spherical coordinates are (R, Θ, Φ) where Θ is in the range of (−π, π) and Φ is in the range

$\left\lbrack {\frac{\pi}{2},\frac{\pi}{2}} \right\rbrack.$

Θ and Φ represent the longitude (parallel arc) and the latitude (meridian arc) of each point, respectively.

The spherical coordinates of these points are given by:

A=(R,Θ _(a),Φ_(a))

B=(R,Θ _(b),Φ_(b))

C=(R,Θ _(c),Φ_(c))

If L ₁ >L ₂, then:

(Θ_(a)−Θ_(c))²+(Φ_(a)−Φ_(c))²>(Θ_(b)−Θ_(c))²+(Φ_(b)−Φ_(c))²  (3)

And

(Θ_(a)−Θ_(c))² sin Φ_(a) sin Φ_(c)+(Φ_(a)−Φ_(c))²>(Θ_(b)−Θ_(c))² sin Φ_(b) sin Φ_(c)+(Φ_(b)−Φ_(c))²  (4)

Eq. (3) is obtained by using flat-surface approximation and by considering the earth radius constant. Eq. (4) is an approximation obtained by applying the Taylor series of cosine function over the real distance.

Intuitively, if a point B on a sphere is closer than another point A with respect to a reference point C, then the angular distance between B and C will also be less than the angular distance between A and C.

A generic point K_(S) in spherical coordinates K_(S)=(R, Θ, Φ), as shown in FIG. 6, can be represented in Euclidean coordinates with the following transformation:

K _(e)=(x,y,z)=(R×cos Θ×sin Φ,R×sin Φ×sin Φ,R×sin Φ)  (5)

To find the real distance between 2 points on a sphere, one can proceed as follows:

d _(e)=√{square root over ((x _(a) −x _(b))²+(y _(a) −y _(b))²+(z _(a) −z _(b))²)}  (6)

where (x_(a), y_(a), z_(a)) and (x_(b), y_(b), z_(b)) are the transformed Euclidean coordinates of points A and B, respectively.

Between the points A and B, there only exists one circumference with radius R. This Euclidean distance can be interpreted as the rope length between A, B on this circumference, as shown in FIG. 7.

The β angle can be calculated as:

$\begin{matrix} {\beta = {\arcsin \mspace{14mu} \left( \frac{d_{e}}{2R} \right)}} & (7) \end{matrix}$

The real distance between the points A and B on the sphere is:

d _(r) =βR  (8)

From the hypothesis, we know that the following inequality should hold

d _(r)(A,C)>d _(r)(C,B)  (9)

Using the previous formulas and the fact that the radius is constant and the arcsin( ) function is monotonically increasing in the dominion, one can conclude that:

d _(e)(A,C)>d _(e)(C,B)  (10)

Hence, we have:

$\begin{matrix} {\sqrt{\begin{matrix} \begin{matrix} {\left( {{\cos \mspace{11mu} \Theta_{a}\mspace{11mu} \sin \mspace{11mu} \Phi_{a}} - {\cos \mspace{11mu} \Theta_{c}\mspace{11mu} \sin \mspace{11mu} \Phi_{c}}} \right)^{2} +} \\ {\left( {{\sin \mspace{11mu} \Theta_{a}\mspace{11mu} \sin \mspace{11mu} \Phi_{a}} - {\sin \mspace{11mu} \Theta_{c}\mspace{11mu} \sin \mspace{11mu} \Phi_{c}}} \right)^{2} +} \end{matrix} \\ \left( {{\cos \mspace{11mu} \Phi_{a}} - {\cos \mspace{11mu} \Phi_{c}}} \right)^{2} \end{matrix}} > \sqrt{\begin{matrix} \begin{matrix} {\left( {{\cos \mspace{11mu} \Theta_{b\mspace{11mu}}\sin \mspace{11mu} \Phi_{b}} - {\cos \mspace{11mu} \Theta_{c}\mspace{11mu} \sin \mspace{11mu} \Phi_{c}}} \right)^{2} +} \\ {\left( {{\sin \mspace{11mu} \Theta_{b}\mspace{11mu} \sin \mspace{11mu} \Phi_{b}} - {\sin \mspace{11mu} \Theta_{c}\mspace{11mu} \sin \mspace{11mu} \Phi_{c}}} \right)^{2} +} \end{matrix} \\ \left( {{\cos \mspace{11mu} \Phi_{b}} - {\cos \mspace{11mu} \Phi_{c}}} \right)^{2} \end{matrix}}} & (11) \end{matrix}$

By solving the squares, we get:

√{square root over (2[1−sin Φ_(a) sin Φ_(c) cos(Θ_(a)−Θ_(c))−cos Φ_(a) cos Φ_(c)])}>√{square root over (2[1−sin Φ_(b) sin Φ_(c) cos(Θ_(b)−Θ_(c))−cos Φ_(b) cos Φ_(c)])}  (12)

By applying the fact that |Θ_(a)−Θ_(c)|, |Θ_(b)−Θ_(c)| are sufficiently small, and by using the second order Taylor series expansion of cosine over small angles, namely the fact that for a small angle x,

cos(x)=1−x ²/2  (13)

we get:

√{square root over (2−2 cos(Φ_(a)−Φ_(c))+sin Φ_(a) sin Φ_(c)(Θ_(a)−Θ_(c))²)}>√{square root over (2−2 cos(Φ_(b)−Φ_(c))+sin Φ_(b) sin Φ_(c)(Θ_(b)−Θ_(c))²)}  (14)

By applying the fact that the angles |Φ_(a)−Φ_(c)|, |Φ_(b)−Φ_(c)| are sufficiently small and using a second order Taylor Series expansion of cosine for any small angle, we get:

(Θ_(a)−Θ_(c))² sin Φ_(a) sin Φ_(c)+(Φ_(a)−Φ_(c))²>(Θ_(b)−Θ_(c))² sin Φ_(b) sin Φ_(c)+(Φ_(b)−Φ_(c))²  (15)

Which establishes the necessary and sufficient conditions for the hypothesis to hold.

Delay Performance

The query should work with a stringent delay constraint. The selection of the VTL leader should be done in a time interval of less than 7 seconds for safety reasons. The geocode query, with an active Internet connection, takes between 100 ms 500 ms, which is in the range required for success of the algorithm.

The query was tested in different environments and the response time depends greatly on the network connectivity and congestion. However, even in a bad environment the query can be accomplished within 500 ms.

Table 1 shows the result of two queries for two different intersections. As shown, the query returns the latitude and the longitude of the intersection and the computation time. The test was done using the LTE 4G network, mimicking the real VTL scenario.

TABLE 1 1) Latitude = 40.4419548 Longitude = −79.9628374 Location= Terrace Street & Darragh Street, University of Pittsburgh, Pittsburgh, PA 15213, USA Time: 377 2)Latitude = 40.45189 Longitude = −79.9520215 Location= Centre Avenue & North Craig Street, Pittsburgh, PA 15213, USA Time: 179

For VTL implementation, the localization algorithm and the VTL leader selection algorithm are combined.

The assisted GPS system of each smartphone can provide the position or location of each smartphone (and hence the vehicle). The location API in Google Maps can provide this information. The coordinates of the center of an intersection can be determined using the Google Geocode API. When a vehicle A receives a beacon packet from another vehicle B, it first checks the address information. If the street of B is different from that of A, this implies that there is an upcoming intersection.

By submitting a query which includes the names of these two different streets, Google API geocode returns the latitude and altitude of the intersection, which can easily be converted to Cartesian Coordinates. Once the vehicle positions and the intersection position are determined, the remaining task is to determine direction in which the vehicles are moving. By looking at the latitude and longitude information of consecutive beacon packets coming from vehicle B, vehicle A can determine whether vehicle B is moving towards the intersection or away from the intersection. If both vehicle A and vehicle B are moving toward the intersection, then an ensuing conflict exists and a VTL leader must be selected to resolve the conflict and manage the competing traffic flows. If, on the other hand, vehicle B is moving away from the intersection while A is moving toward the intersection, this does not constitute a conflict and, therefore, there is no need to choose a VTL leader by executing the VTL leader selection algorithm 400. As the preferred embodiment, the developed conflict detection algorithm utilizes Google Maps and the API's available on Google Maps.

While the invention is explained using services provided by Google Maps, other embodiments using other map services, for example, Apple Maps, Tiger Maps, Open Street Maps, etc. as the basis of the localization and conflict detection for establishing the VTL leader and implementing the VTL localization algorithm 300 are possible and are within the scope of the invention.

The algorithms may be embodied in an app suitable for execution on a smartphone or tablet computing device having a screen to provide a visual indication of a traffic signal when approaching an intersection. In certain embodiments, the smartphone or tablet computing device may communicate with other vehicles via a DSRC transceiver provided as an aftermarket product or installed by the vehicle manufacturer in the vehicle, as will soon be required by the U.S. Department of Transportation. Alternatively, any other means by which smart phones or tablet computing devices communicate with each other are within the scope of the invention, including, for example, LTE, Wi-Fi, Bluetooth, Wi-Fi direct, etc. In alternative embodiments, a dedicated computing device having a display screen could be used to implement the algorithms and communicate with other vehicles. In yet other embodiments, the app may execute the algorithms and communicate with a vehicle via a product such as Apple Carplay to provide a visual display of the traffic light indicator on a display screen installed in the vehicle or in a heads-up display.

It should also be realized that the method of the present invention may be used in conjunction with the ideal VTL method set forth in U.S. Pat. No. 8,972,159 or with the non-ideal VTL method set forth in PCT application PCT/US18/54504.

To those skilled in the art to which the invention relates, many modifications and adaptations of the invention will suggest themselves. Implementations provided herein, including implementations using various components or arrangements of components should be considered exemplary only and are not meant to limit the invention in any way. As one of skill in the art would realize, many variations on implementations discussed herein which fall within the scope of the invention are possible. Accordingly, the exemplary methods and apparatuses disclosed herein are not to be taken as limitations on the invention but as an illustration thereof. Additionally, it should also be realized that the invention is not limited to on-road vehicles, but may be implemented with respect to many other types of vehicles, including, for example, vehicles used at an airport or sea port for carrying passengers, food, luggage, etc., vehicles used in military camps or warehouses, aircraft, including unmanned and/or autonomous drones, seacraft, railroads, transit lines, etc. Additionally, it should also be realized that the invention is not only applicable to human operated vehicles but may also be used to inform autonomous control systems for any type of vehicles, including autonomous vehicles. 

We claim:
 1. A software-implemented method in a first vehicle for selecting a lead vehicle at an intersection for controlling a virtual traffic light comprising: receiving one or more data packets from a second vehicle; based on information in the data packet, determining: if the first and second vehicles are moving closer to each other; if the first and second vehicles are travelling on the different streets; if the different streets intersect, and if so, the geographic position of the intersection; determining a first distance of the first vehicle from the intersection and a second distance of the second vehicle from the intersection; determining a lead vehicle for the intersection based on the first and second distances; displaying, within the first vehicle a traffic light indicator indicating the status of the virtual traffic light.
 2. The method of claim 1 wherein determining if the first and second vehicles are moving closer to each other comprises: determining a first geographic position for the first vehicle and a second geographic position for the first vehicle; retrieving a first geographic position for the second vehicle and a second geographic position for the second vehicle from the data packet; calculating a first distance between the first vehicle and the second vehicle based on the first geographic position for the first vehicle and the first geographic position of the second vehicle; computing a second distance between the first vehicle and the second vehicle based on the second geographic position for the first vehicle and the second geographic position of the second vehicle; determining if the distance between the first vehicle and the second vehicle is decreasing, based on the difference between the first distance and the second distance.
 3. The method of claim 1 wherein determining if the first and second vehicles are travelling on the different streets comprises: retrieving the street name on which the first vehicle is travelling; retrieving the street name on which the second vehicle is travelling; comparing the street names to determine a non-match between the street names.
 4. The method of claim 3 wherein: retrieving the street name on which the first vehicle is travelling comprises querying an online mapping service using the geographic position of the first vehicle or retrieving the street name from a local mapping database; and retrieving the street name on which the second vehicle is travelling comprises querying an online mapping service using the geographic position of the second vehicle or retrieving the street name from one of the received data packets.
 5. The method of claim 3 wherein determining if the different streets intersect comprises querying an online mapping service, using the street name on which the first vehicle is travelling and the street name on which the second vehicle is travelling.
 6. The method of claim 2 wherein determining a first distance of the first vehicle from the intersection and a second distance of the second vehicle from the intersection comprises: calculating an angular distance between the second geographic position for the first vehicle and the geographic position of the intersection; calculating the angular distance between the second geographic position for the first vehicle and the geographic position of the intersection. wherein the angular distances are based on the radius of the Earth.
 7. The method of claim 1 wherein determining a lead vehicle comprises declaring the farthest from the intersection among the first vehicle and the second vehicle as the lead vehicle and the closest to the intersection among the first and second vehicles as a non-lead vehicle.
 8. The method of claim 7 wherein the determined lead vehicle performs the steps of: building a status packet and broadcasting the status packet one or more times; setting the status of the traffic light indicator within the lead vehicle to show a red light indication; and waiting for an acknowledge packet from the non-lead vehicle.
 9. The method of claim 7 wherein the determined non-lead vehicle performs the steps of: receiving a status packet from the lead vehicle; setting the status of the traffic light indicator within the non-lead vehicle to show a green light indication; and sending an acknowledge packet to the lead vehicle.
 10. The method of claim 1 wherein the geographic position of the first vehicle is retrieved from a GPS unit on board the first vehicle.
 11. The method of claim 1 wherein the method is implemented as software executing as an application on a mobile computing device.
 12. The method of claim 11 wherein the one or more data packets are sent and received via a communication interface built into the mobile computing device.
 13. The method of claim 12 wherein the communication interface built into the mobile computing device comprises LTE, Wi-Fi, Bluetooth, 4G, 5G, RFID or Wi-Fi direct.
 14. The method of claim 11 wherein the one or more data packets are sent and received via an interface between the mobile computing device and an external dedicated short range communication radio.
 15. A traffic control system comprising: a mobile computing device in a first vehicle; a display screen on the mobile computing device; an application installed on the mobile computing device for performing the functions of: receiving one or more data packets from a second vehicle; based on information in the data packet, determining: if the first vehicle and the second vehicle are moving closer to each other; if the first vehicle and the second vehicle are travelling on the different streets; if the different streets intersect, and if so, the geographic position of the intersection; determining a first distance of the first vehicle from the intersection and a second distance of the second vehicle from the intersection; determining a lead vehicle for the intersection based on the first and second distances, the lead vehicle controlling virtual traffic lights at the intersection; and displaying a traffic light indicator on the display screen, the status of the traffic light indicator being determined by the lead vehicle.
 16. The system of claim 15 further comprising a GPS unit, wherein the geographic positions of the first vehicle are retrieved from the GPS unit.
 17. The system of claim 15 wherein the one or more data packets are received via a communication interface built into the mobile computing device, the communication interface comprising LTE, Wi-Fi, RFID, 4G, 5G, Bluetooth or Wi-Fi direct.
 18. The system of claim 15 wherein the one or more data packets are sent and received via an interface between the mobile computing device and an external dedicated short range communication radio.
 19. The system of claim 15 wherein determining a lead vehicle for the intersection comprises declaring the farthest from the intersection among the first vehicle and the second vehicles as the lead vehicle and the closest to the intersection among the first and second vehicles as a non-lead vehicle.
 20. The system of claim 19 wherein the lead vehicle yields leadership to a vehicle travelling in an orthogonal direction based on number of vehicles in a cluster of the lead vehicle and the number of vehicles in a cluster of a vehicle travelling in the orthogonal direction.
 21. The system of claim 19 wherein: the status of the displayed traffic light indicator is red if the first vehicle is determined to be the lead vehicle; and the status of the displayed traffic light indicator is green if the first vehicle is determined to be a non-lead vehicle. 